<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>体验金</title>
    <link rel="stylesheet" type="text/css" href="./css/api.css" />
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/font-awesome.min.css" />
    <link rel="stylesheet" type="text/css" href="./css/styleold.css" />
    <script type="text/javascript" src="./script/api.js"></script>
    <script type="text/javascript" src="./script/aui-tab.js" ></script>
    <link rel="stylesheet" type="text/css" href="./css/aui-slide.css" />
    <script type="text/javascript" src="./script/aui-slide.js"></script>
    <script type="text/javascript">
        function closeWin(){
            api.closeWin({
            });
        };
    </script>
</head>
<body>
 <!-- 头部 -->
 <header class="aui-bar aui-bar-nav pos">
    <a class="aui-pull-left aui-btn" onclick="closeWin()">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title">体验金</div>
</header>

<!-- 体验金 -->
<style>
    body,html{height:100%; padding-top:0px; background:#e0041b;}
</style>
<div class="hongbao">
    <div class="hongbao-t-2"><span id="money_top">0</span>元体验金</div>
    <div class="hongbao-m-2">
        <p>恭喜您成功领取<span id="money_bottom">0</span>元体验金</p>
        <p>体验金不可提现，只能用于体验标</p>
    </div>
    <a class="hongbao-btn" onclick="openTiyanjin();">查看体验金</a>
    <a class="hongbao-btn" onclick="openLicai()">立即投资</a>
</div>
</body>
<script type="text/javascript">

    apiready = function(){
        var param = api.pageParam;
        money = param.learn_list_money;
        var money_top = document.getElementById("money_top");
        var money_bottom = document.getElementById("money_bottom");
        money_top.innerText = money;
        money_bottom.innerText = money;
    }

    // 查看体验金 
    function openTiyanjin(){
        api.openWin({
            name: 'money',
            url: './money.html',
            bounces: false,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
            progress: {
                type: "page"
            }
        });
    }

    // 去投资
    function openLicai(){
        // 上页面刷新数据
        // var refreshLicai = 'gotoLicai();';
        // api.execScript({
        //     name: 'home',
        //     script: refreshLicai,
        // });

        // // 成功后关闭登录页面
        // api.closeToWin({
        //     name: 'home'
        // });

        api.openWin({
            name: 'money',
            url: './money.html',
            pageParam: {
                name: 'test'
            }
        });
    }
</script>
</html>
